<?php
/**
 * @file $HeadURL: crontab.php $
 * @author $Author: DongJC (dongjianchang@haibao.com) $
 * @date $Date: 2015-3-5 ����4:03:42 $
 * @brief 
 */

namespace haibao\cms\data;


class Crontab extends \haibao\cms\data\BaseMysql {
	public function __construct() {
		
	} 
	/**
	 * 预发布文章id
	 */
	public function getCronArticleId(){
  		$db = new \haibao\frame\data\MysqlData('\haibao\cms\model\data\Article');
		$articleId = array();
		$today[] = date('Y-m-d H:i:s',time());
		$sql="select * from Article where Published = 1 limit 1  ";
		$result = $db->query($sql,array());
		
		while($result->fetch_assoc()){
			$articleId[] = $result->getData('Id');
		}
		return $articleId; 
	}
}